<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>网站信息</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/pintuer.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/admin.css">
    <script src="${pageContext.request.contextPath}/js/jquery.js"></script>
    <script src="${pageContext.request.contextPath}/js/pintuer.js"></script>
    <script type="text/javascript">
		 $(function(){
			 $("#fileBut").click(function(){
				 $("#file").click();
				 })
		     $("#file").change(function(){
			  form1.fileName.value   =form1.file.value;
			 });  ;
			 });

    </script>

    <script type="text/javascript">
        function managerDelete(managerId) {
            if(confirm("您确定要删除这个店面信息吗？")) {
                console.log("=》进入了js")
                window.location="${pageContext.request.contextPath}/manager?action=delete&managerId="+managerId;
            }
        }

        $(document).ready(function(){
            $("ul li:eq(1)").addClass("active");
        });
    </script>
</head>
<body>

 <form class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
    <div class="padding border-bottom">
      <form   name="form1"   method="post"   action="">
      <ul class="search" style="padding-left:10px;">

        <li>请选择：</li>
        <li>学院
          <select name="s_ishome" class="input" onchange="changesearch()" style="width:200px; line-height:17px; display:inline-block">
            <option value="">选择</option>
            <option value="1">是</option>
            <option value="0">否</option>
          </select>
          &nbsp;&nbsp;
          班级
          <select name="s_isvouch" class="input" onchange="changesearch()"  style="width:200px; line-height:17px;display:inline-block">
            <option value="">选择</option>
            <option value="1">是</option>
            <option value="0">否</option>
          </select>
        </li>
        <if condition="$iscid eq 1">
          <li>
           <input  type="file" style="display:none" name="file" id="file" >
             <input type="text" placeholder="请点击导入按钮选择xls或xlsx文件" name="fileName" class="input" style="width:250px; line-height:17px;display:inline-block"  readonly=""/>
           <a href="javascript:void(0)" class="button border-main icon-search" id="fileBut" > 导入数据</a></li>
            <a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()" >导出摸板</a>


          </li>
        </if>

      </ul>
      </ul>
      </form>
    </div>

    <table class="table table-hover text-center">
      <tr>
        <th width="100" style="text-align:left; padding-left:20px;">编号</th>
        <th width="10%">id</th>
        <th>账户名</th>
        <th width="50">密码</th>

      </tr>
      <volist name="list" id="vo">
          <c:forEach items="${requestScope.listmanager}" var="li">
        <tr>
            <td style="text-align:left; padding-left:20px;"><input type="checkbox" name="id[]" value="" />
                1</td>
       <td>${li.manager_id}</td>
            <td>${li.manager_account}</td>
            <td>${li.manager_password}</td>


          <td>
              <div class="button-group">
                  <a class="button border-main" href="${pageContext.request.contextPath}/admin/updateManager.jsp?id=${li.manager_id}">
              <span class="icon-edit"></span> 修改</a>
              <a class="button border-red" href="javascript:void(0)" onclick="managerDelete(${li.manager_id})">
              <span class="icon-trash-o"></span> 删除</a> </div></td>

        </tr>
          </c:forEach>


      </volist>

    </table>
  </div>
</form>
 <div class="button-group">
     <a class="button border-main" href="${pageContext.request.contextPath}/admin/addmanager.jsp">
         <span class="icon-edit"></span> 增加顾客信息</a>
<script type="text/javascript">
    function querryAllAccount() {
        window.location.href="manager";

    }

//搜索
function changesearch(){

}

//单个删除
function del(id,mid,iscid){
	if(confirm("您确定要删除吗?")){

	}
}

//全选
$("#checkall").click(function(){
  $("input[name='id[]']").each(function(){
	  if (this.checked) {
		  this.checked = false;
	  }
	  else {
		  this.checked = true;
	  }
  });
})

//批量删除
function DelSelect(){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {
		Checkbox=true;
	  }
	});
	if (Checkbox){
		var t=confirm("您确认要删除选中的内容吗？");
		if (t==false) return false;
		$("#listform").submit();
	}
	else{
		alert("请选择您要删除的内容!");
		return false;
	}
}

//批量排序
function sorts(){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {
		Checkbox=true;
	  }
	});
	if (Checkbox){

		$("#listform").submit();
	}
	else{
		alert("请选择要操作的内容!");
		return false;
	}
}


//批量首页显示
function changeishome(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {
		Checkbox=true;
	  }
	});
	if (Checkbox){

		$("#listform").submit();
	}
	else{
		alert("请选择要操作的内容!");

		return false;
	}
}

//批量推荐
function changeisvouch(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {
		Checkbox=true;
	  }
	});
	if (Checkbox){


		$("#listform").submit();
	}
	else{
		alert("请选择要操作的内容!");

		return false;
	}
}

//批量置顶
function changeistop(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {
		Checkbox=true;
	  }
	});
	if (Checkbox){

		$("#listform").submit();
	}
	else{
		alert("请选择要操作的内容!");

		return false;
	}
}


//批量移动
function changecate(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {
		Checkbox=true;
	  }
	});
	if (Checkbox){

		$("#listform").submit();
	}
	else{
		alert("请选择要操作的内容!");

		return false;
	}
}

//批量复制
function changecopy(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {
		Checkbox=true;
	  }
	});
	if (Checkbox){
		var i = 0;
	    $("input[name='id[]']").each(function(){
	  		if (this.checked==true) {
				i++;
			}
	    });
		if(i>1){
	    	alert("只能选择一条信息!");
			$(o).find("option:first").prop("selected","selected");
		}else{

			$("#listform").submit();
		}
	}
	else{
		alert("请选择要复制的内容!");
		$(o).find("option:first").prop("selected","selected");
		return false;
	}
}

</script>
</body>
</html>
